-- GENERATED SPELL FOR [Spirit of Maraudos] --


function spell0_12242(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12242', 2305, 1)
end

function spell1_12242(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(15667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12242', 557, 1)
end

function spell2_12242(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(15795,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12242', 566, 1)
end

function Sorts_12242(pUnit, Event)
local choix_sorts_12242 = math.random(0, 2)
if choix_sorts_12242 == 0 then
pUnit:RegisterEvent('spell0_12242', 1, 1)
end
if choix_sorts_12242 == 1 then
pUnit:RegisterEvent('spell1_12242', 1, 1)
end
if choix_sorts_12242 == 2 then
pUnit:RegisterEvent('spell2_12242', 1, 1)
end
end

function mob12242_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12242', math.random(1500, 3000), 1)
end

function mob12242_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12242_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12242_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12242, 1, 'mob12242_Action')
RegisterUnitEvent(12242, 2, 'mob12242_Leave')
RegisterUnitEvent(12242, 3, 'mob12242_Kill')
RegisterUnitEvent(12242, 4, 'mob12242_Die')
